package com.example.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * TODO
 *
 * @author ding
 * @since 2024/6/2
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@TableName("team")
public class Team {

    @TableId(type = IdType.AUTO)
    private Integer id;
    /** 团队名称 */
    private String name;
    /** 团队描述 */
    private String description;
    /** 团队图片 */
    private String img;
    /** 负责项目 */
    private Integer projectId;
    /** 是否删除 */
    private Integer isDeleted;
    /** 创建时间 */
    private LocalDate setTime;
    /** 团队人数 */
    private Integer num;
    /** 队长id */
    private Integer captainId;

    /** 乐观锁版本号 */
    @ApiModelProperty("乐观锁版本号")
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Integer version;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /** 更新时间 */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private String projectName;
}
